package com.littlegnal.share2;

import com.littlegnal.share2.model.CourseListCollection;
import com.littlegnal.share2.model.User;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * @author littlegnal
 * @date 2017/2/22
 */

public interface ScheduleCourseNetService {

  @GET("course/group-list.json")
  Call<CourseListCollection> getCourseList(
      @Query("groupId") int groupId,
      @Query("beginDate") String beginDate,
      @Query("endDate") String endDate);

  @GET("course/group-list.json")
  Observable<CourseListCollection> getCourseListObservable(
      @Query("groupId") int groupId,
      @Query("beginDate") String beginDate,
      @Query("endDate") String endDate);

  @POST("user/login.d")
  Call<User> login(@Field("name") String name, @Field("password") String password);

  @POST("user/login.d")
  Observable<User> loginObservable(@Field("name") String name, @Field("password") String password);
}
